﻿using LogisticsTrackingWebApi_V3.Models;

namespace LogisticsTrackingWebApi_V3.Services
{

    /// <summary>
    /// 物流查询策略接口
    /// </summary>
    public interface ILogisticsProvider
    {
        /// <summary>
        /// 公司编码
        /// </summary>
        string CompanyCode { get; }

        /// <summary>
        /// 公司名称
        /// </summary>
        string CompanyName { get; }

        /// <summary>
        /// 查询物流信息
        /// </summary>
        /// <param name="trackingNumber">运单号</param>
        /// <returns>物流信息</returns>
        Task<LogisticsInfo> QueryTrackingAsync(string trackingNumber);

        /// <summary>
        /// 判断运单号是否匹配当前物流公司
        /// </summary>
        /// <param name="trackingNumber">运单号</param>
        /// <returns>是否匹配</returns>
        bool MatchTrackingNumber(string trackingNumber);
    }

}
